//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//********************************************************* 

using System;
using System.Windows.Forms;

namespace Microsoft.TridentWordAddIn.Common
{
    /// <summary>
    /// This interface helps manage the task panels in the word documents. 
    /// </summary>
    public interface ITaskPaneManager
    {
        /// <summary>
        /// The event fires when a custom task pane in Word changes visibility
        /// </summary>
        event EventHandler<VisibilityChangedEventArgs> TaskPaneVisibilityChanged;

        /// <summary>
        /// The event fires when a custom task pane in Word changes visibility
        /// </summary>
        event EventHandler<DockPositionChangedEventArgs> TaskPaneDockPositionChanged;

        /// <summary>
        /// Creates a custom task pane.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="userControl">The user control.</param>
        void CreateTaskPane(string title, UserControl userControl);

        /// <summary>
        /// Removes the task pane associated with the task pane key.
        /// </summary>
        void RemoveTaskPanes();

        /// <summary>
        /// Removes the task pane.
        /// </summary>
        /// <param name="title">The title.</param>
        void RemoveTaskPane(string title);

        /// <summary>
        /// Gets the task pane user control.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="documentKey">The document key.</param>
        /// <returns>UserControl</returns>
        UserControl GetTaskPaneUserControl(string title, int documentKey);

        /// <summary>
        /// Determines whether [is task pane visible] [the specified title].
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="documentKey">The document key.</param>
        /// <returns>
        /// 	<c>true</c> if [is task pane visible] [the specified title]; otherwise, <c>false</c>.
        /// </returns>
        bool IsTaskPaneVisible(string title, int documentKey);

        /// <summary>
        /// Sets the task pane visibility.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="isVisible">if set to <c>true</c> [is visible].</param>
        /// <param name="documentKey">The document key.</param>
        void SetTaskPaneVisibility(string title, bool isVisible, int documentKey);

        /// <summary>
        /// Tasks the pane exists.
        /// </summary>
        /// <param name="title">The title.</param>
        /// <param name="documentKey">The document key.</param>
        /// <returns>bool</returns>
        bool TaskPaneExists(string title, int documentKey);
    }
}
